package com.situ.vivamarket.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.situ.vivamarket.model.front.MemberAddress;
import com.situ.vivamarket.model.front.OrderItem;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

//订单的总信息，包括总金额，多个订单项，订单号
@Setter
@Getter
@JsonIgnoreProperties("handler")
public class Order {
    private Integer id;
    private String orderNo;
    private Integer memberId;
    private BigDecimal totalPay;//订单总额
    private String payType;//支付方式
    private OrderState state;//订单状态
    private LocalDateTime createdTime;
    //    收货信息
    private String receiverName;//收货人姓名
    private String receiverPhone;
    private Integer receiverAddrId;//收货人地址编号,关联地址
    private String receiverAddrDetail;
    private String note;//订单备注

    //    关联收获信息
    private MemberAddress memberAddress;

    //    订单项
    private List<OrderItem> orderItems;
    //    订单所属会员
    private Member member;
}
